3.8.79 \(\int \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \, dx\) [779]

Optimal. Leaf size=65 \[ -\frac {2 \text {ArcTan}\left (\frac {\sin (x)}{\sqrt {1-\cos (x)} \sqrt {a-\cos (x)}}\right ) \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \sqrt {a-\cos (x)}}{\sqrt {1-\cos (x)}} \]

[Out]

-2*arctan(sin(x)/(1-cos(x))^(1/2)/(a-cos(x))^(1/2))*((1-cos(x))/(a-cos(x)))^(1/2)*(a-cos(x))^(1/2)/(1-cos(x))^
(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {4485, 2854, 210} \begin {gather*} -\frac {2 \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \sqrt {a-\cos (x)} \text {ArcTan}\left (\frac {\sin (x)}{\sqrt {1-\cos (x)} \sqrt {a-\cos (x)}}\right )}{\sqrt {1-\cos (x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[(1 - Cos[x])/(a - Cos[x])],x]

[Out]

(-2*ArcTan[Sin[x]/(Sqrt[1 - Cos[x]]*Sqrt[a - Cos[x]])]*Sqrt[(1 - Cos[x])/(a - Cos[x])]*Sqrt[a - Cos[x]])/Sqrt[
1 - Cos[x]]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 2854

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
-2*(b/f), Subst[Int[1/(b + d*x^2), x], x, b*(Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]))
], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 4485

Int[(u_.)*((v_)^(m_.)*(w_)^(n_.))^(p_), x_Symbol] :> With[{uu = ActivateTrig[u], vv = ActivateTrig[v], ww = Ac
tivateTrig[w]}, Dist[(vv^m*ww^n)^FracPart[p]/(vv^(m*FracPart[p])*ww^(n*FracPart[p])), Int[uu*vv^(m*p)*ww^(n*p)
, x], x]] /; FreeQ[{m, n, p}, x] &&  !IntegerQ[p] && ( !InertTrigFreeQ[v] ||  !InertTrigFreeQ[w])

Rubi steps

\begin {align*} \int \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \, dx &=\frac {\left (\sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \sqrt {a-\cos (x)}\right ) \int \frac {\sqrt {1-\cos (x)}}{\sqrt {a-\cos (x)}} \, dx}{\sqrt {1-\cos (x)}}\\ &=\frac {\left (2 \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \sqrt {a-\cos (x)}\right ) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,\frac {\sin (x)}{\sqrt {1-\cos (x)} \sqrt {a-\cos (x)}}\right )}{\sqrt {1-\cos (x)}}\\ &=-\frac {2 \tan ^{-1}\left (\frac {\sin (x)}{\sqrt {1-\cos (x)} \sqrt {a-\cos (x)}}\right ) \sqrt {\frac {1-\cos (x)}{a-\cos (x)}} \sqrt {a-\cos (x)}}{\sqrt {1-\cos (x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 64, normalized size = 0.98 \begin {gather*} -\sqrt {2} \sqrt {\frac {-1+\cos (x)}{-a+\cos (x)}} \sqrt {-a+\cos (x)} \csc \left (\frac {x}{2}\right ) \log \left (\sqrt {2} \cos \left (\frac {x}{2}\right )+\sqrt {-a+\cos (x)}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[(1 - Cos[x])/(a - Cos[x])],x]

[Out]

-(Sqrt[2]*Sqrt[(-1 + Cos[x])/(-a + Cos[x])]*Sqrt[-a + Cos[x]]*Csc[x/2]*Log[Sqrt[2]*Cos[x/2] + Sqrt[-a + Cos[x]
]])

________________________________________________________________________________________

Maple [A]
time = 0.19, size = 67, normalized size = 1.03

method result size
default \(-\frac {\sqrt {2}\, \sqrt {\frac {-1+\cos \left (x \right )}{-a +\cos \left (x \right )}}\, \sin \left (x \right ) \sqrt {-\frac {2 \left (-a +\cos \left (x \right )\right )}{\cos \left (x \right )+1}}\, \arctan \left (\frac {\sqrt {-\frac {2 \left (-a +\cos \left (x \right )\right )}{\cos \left (x \right )+1}}\, \sqrt {2}}{2}\right )}{-1+\cos \left (x \right )}\) \(67\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((1-cos(x))/(a-cos(x)))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-2^(1/2)*((-1+cos(x))/(-a+cos(x)))^(1/2)*sin(x)*(-2*(-a+cos(x))/(cos(x)+1))^(1/2)*arctan(1/2*(-2*(-a+cos(x))/(
cos(x)+1))^(1/2)*2^(1/2))/(-1+cos(x))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((1-cos(x))/(a-cos(x)))^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(a-1>0)', see `assume?` for mor
e details)Is

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 32, normalized size = 0.49 \begin {gather*} -\arctan \left (-\frac {{\left (a - 2 \, \cos \left (x\right ) - 1\right )} \sqrt {-\frac {\cos \left (x\right ) - 1}{a - \cos \left (x\right )}}}{2 \, \sin \left (x\right )}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((1-cos(x))/(a-cos(x)))^(1/2),x, algorithm="fricas")

[Out]

-arctan(-1/2*(a - 2*cos(x) - 1)*sqrt(-(cos(x) - 1)/(a - cos(x)))/sin(x))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {1 - \cos {\left (x \right )}}{a - \cos {\left (x \right )}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((1-cos(x))/(a-cos(x)))**(1/2),x)

[Out]

Integral(sqrt((1 - cos(x))/(a - cos(x))), x)

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 46, normalized size = 0.71 \begin {gather*} 2 \, \arctan \left (\frac {1}{2} \, \sqrt {2} \sqrt {a \tan \left (\frac {1}{2} \, x\right )^{2} + \tan \left (\frac {1}{2} \, x\right )^{2} + a - 1}\right ) \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, x\right )^{3} + \tan \left (\frac {1}{2} \, x\right )\right ) \mathrm {sgn}\left (a - \cos \left (x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((1-cos(x))/(a-cos(x)))^(1/2),x, algorithm="giac")

[Out]

2*arctan(1/2*sqrt(2)*sqrt(a*tan(1/2*x)^2 + tan(1/2*x)^2 + a - 1))*sgn(tan(1/2*x)^3 + tan(1/2*x))*sgn(a - cos(x
))

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \sqrt {-\frac {\cos \left (x\right )-1}{a-\cos \left (x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-(cos(x) - 1)/(a - cos(x)))^(1/2),x)

[Out]

int((-(cos(x) - 1)/(a - cos(x)))^(1/2), x)

________________________________________________________________________________________